package com.nervenets.web.controller.user;

import com.nervenets.Global;
import com.nervenets.web.controller.TokenParams;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

@EqualsAndHashCode(callSuper = true)
@Data
public class BindMobileParams extends TokenParams {
    @ApiModelProperty(value = "手机号码", required = true)
    @NotNull(message = "不能为空")
    @Pattern(regexp = Global.RegExp.MOBILE, message = "请输入正确的手机号码")
    private String mobile;
    @ApiModelProperty(value = "验证码", required = true)
    @NotNull(message = "不能为空")
    @Min(value = 100000, message = "请输入六位数字验证码")
    @Max(value = 999999, message = "请输入六位数字验证码")
    private int validationCode;
}
